package com.example.qt.ptplatform.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

@Data
@TableName("comments")  // 表名与数据库保持一致
public class Comments {

    @TableId(value = "comment_id", type = IdType.AUTO) // comment_id 自增
    private Integer commentId;

    private Integer torrentId;
    private Integer comCommentId;  // 回复的评论ID，允许为空
    private Integer userId;
    private String content;
    private Boolean isAnonymous;
    private Integer likesCount = 0;  // 默认为0
    private Integer replyCount = 0;  // 默认为0
    private Date commentTime;

}
